﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Peekaboo2008.dao;
using System.Configuration;

namespace Peekaboo2008.view
{
    public partial class FormBaoCaoCongNoKhachHang : Form
    {
        String applicationPath = ConfigurationManager.AppSettings["ApplicationPath"];
        public FormBaoCaoCongNoKhachHang()
        {
            InitializeComponent();
            LoadChiNhanh();
            LoadKhuVuc();
        }


        /**/
        // Lay du lieu tu table ChiNhanh bang store sp_ChiNhanh_GetALL do vao cbbChiNhanh
        /**/

        public void LoadChiNhanh()
        {
            cbbChiNhanh.DataSource = ChiNhanhDAO.getAll();
            cbbChiNhanh.DisplayMember = "Ten";
            cbbChiNhanh.ValueMember = "ID";
        }


        /**/
        // Lay du lieu tu table KhuVuc bang store sp_KhuVuc_GetAll do vao cbbKhuVuc
        /**/

        public void LoadKhuVuc()
        {
            cbbKhuVuc.DataSource = KhuVucDAO.getAll();
            cbbKhuVuc.DisplayMember = "Ten";
            cbbKhuVuc.ValueMember = "ID";
        }

        private void btnChapNhan_Click(object sender, EventArgs e)
        {
            Int32 chiNhanh = Convert.ToInt32(cbbChiNhanh.SelectedValue.ToString());
            DateTime tuNgay = dateTimePicker1.Value;
            DateTime denNgay = dateTimePicker2.Value;
            Int32 khuVuc = Convert.ToInt32(cbbKhuVuc.SelectedValue.ToString());
        }

        private void btnKetThuc_Click(object sender, EventArgs e)
        {
            this.Dispose();
        }
    }
}
